M291 S4 R"Bed Temperature After Job End" P"Select an option:" K{"Reset to 0C", "Keep at 110C", "Keep at 150C", "Keep current temperature"} H1

if input = 0
    echo >"0:/user/bedfinishbehavior.g" "M140 S0 ; Keep the Bed at 0°C after print is finished"
    echo "Bed temperature will be reset to 0°C after print is finished"
elif input = 1
    echo >"0:/user/bedfinishbehavior.g" "M140 S110 ; Keep the Bed at 110°C after print is finished"
    echo "Bed temperature will be kept at 110°C after print is finished"
elif input = 2
    echo >"0:/user/bedfinishbehavior.g" "M140 S150 ; Keep the Bed at 150°C after print is finished"
    echo "Bed temperature will be kept at 150°C after print is finished"
elif input = 3
    echo >"0:/user/bedfinishbehavior.g" "; Please edit contents of '/macros/System/Settings/Keep the Bed 110C after print is finished'"
    echo "Current bed temperature will be maintained after print is finished"